<?php
/**
 * Application.php
 * 
 * Main Application
 *
 * @autor Carlos Gonzalez <zahualli@gmail.com>
 * @copyright Copyright (c) 2009, Carlos Gonzalez
 * @package Core
 */
class Nopal_Application{

	/**
	 * Name of applcation
	 * @var string
	 * @access private
	 */
	private $_name;

	/**
	 * Protocol access (http|https)
	 * @var string
	 * @access private
	 */
	private $_protocol = "http";

	/**
	 * Domain access
	 * @var string
	 * @access private
	 */
	private $_domain;

	/**
	 * Path access
	 * @var string
	 * @access private
	 */
	private $_path;

	/**
	 * Port access
	 * @var int
	 * @access private
	 */
	private $_port;

	/**
	 * Config directory
	 * @var string
	 * @access private
	 */
	private $_config_dir = 'conf';

	/**
	 * Config array
	 * @var array
	 * @access private
	 */
	private $_config;

	/**
	 * Database Manager
	 * @var DbManager
	 * @access public
	 */
	public $dbm;

	/**
	 * Services Manager
	 * @var ServicesManager
	 * @access public
	 */
	public $svm;

	/**
	 * Session Manager
	 * @var SessionManager
	 * @access public
	 */
	public $ssm;

	/**
	 * Log Manager
	 * @var LogManager
	 * @access public
	 */
	public $lgm;

	/**
	 * Actually User of application
	 * @var User
	 * @access public
	 */
	public $user;

	/**
	 * Constructor of class
	 */
	private function __construct(){

		$this->dbm = Nopal_Db_DbManager::getInstance( );
		$this->svm = Nopal_Services_ServicesManager::getInstance( );
		$this->ssm = Nopal_Session_SessionManager::getInstance( );
		$this->lgm = Nopal_Log_LogManager::getInstance( );
		$this->user = Nopal_User::getInstance( );
	}

	public function getInstance()
	{
		if (!self::$_instance instanceof self) 
		{
			self::$_instance = new self;
		}
		return self::$_instance;
	}
	/**
	 * Load Configuration General
	 * @return bool
	 */
	public function LoadConfig(){
	
	
	}

	/**
	 * Init application
	 * @return bool
	 */
	public function init(){
	
	}
	
	public function getAction( $name ){
		
		
	}	


	
?>
